package com.luhuiguo.sso.service;

import java.util.List;

import org.springframework.security.userdetails.UserDetailsService;

import com.luhuiguo.sso.entity.User;
import com.luhuiguo.sso.web.model.RegistrationInfo;

public interface UserManager extends UserDetailsService {

	User getUser(Long id);

	User getUser(String username);

	List<User> getAllUser(int... rowStartIdxAndCount);

	boolean existsUser(Long id);

	boolean existsUser(String username);

	void createUser(User user);

	void createUser(User user, boolean raw);
	
	User createUser(String username, String passwordPlaintext, String email);

	User createUser(RegistrationInfo reg);	
	
	void updateUser(User user);

	void deleteUser(Long id);

	void deleteUser(String username);

	void deleteUser(User user);

	void updatePassword(User user, String rawPass);
	
	void updatePassword(String username, String rawPass);

	boolean validatePassword(User user, String rawPass);

	boolean validatePassword(String username, String rawPass);	
	
}